//
//  dayGanttViewViewController.m
//  planningV3
//
//  Created by richard_local on 26/09/13.
//  Copyright (c) 2013 ierdre.com. All rights reserved.
//

#import "dayGanttViewViewController.h"
@interface dayGanttViewViewController ()

@end

@implementation dayGanttViewViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization

    }
   
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSLog(@" -----> \n\n %d",self.detail);
    
    
    
    self.title = @"Custom View";
    
    // Set up the container view to hold our custom view hierarchy
    CGSize containerSize = CGSizeMake(LARGEUR_JOUR, 1640.0f);
    self.containerView = [[dayGanttView alloc] initWithFrame:(CGRect){.origin=CGPointMake(0.0f, 0.0f), .size=containerSize}];
    [self.scrollView addSubview:self.containerView];
    /*
    // Set up our custom view hierarchy
    UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 640.0f, 80.0f)];
    redView.backgroundColor = [UIColor redColor];
    [self.containerView addSubview:redView];
    
    UIView *blueView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 560.0f, 640.0f, 80.0f)];
    blueView.backgroundColor = [UIColor blueColor];
    [self.containerView addSubview:blueView];
    
    UIView *greenView = [[UIView alloc] initWithFrame:CGRectMake(160.0f, 160.0f, 320.0f, 320.0f)];
    greenView.backgroundColor = [UIColor greenColor];
    [self.containerView addSubview:greenView];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"slow.png"]];
    imageView.center = CGPointMake(320.0f, 320.0f);
    [self.containerView addSubview:imageView];*/
    
    // Tell the scroll view the size of the contents
    self.scrollView.contentSize = containerSize;

  
	// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
  //  NSLog(@" -----> Scroll dece ");
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
    //NSLog(@" -----> Scroll %f",self.scrollView.contentOffset.x);
    [self.containerView setScroll:self.scrollView.contentOffset];
}
@end
